package fr.coupedumonde2014.app.modele;

/**
 * Created by dev-w8-gfi on 22/05/2014.
 */
public class Utilisateur {

    public String id;
    public String email;
    public String password;
    public String points;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getEmail() {
        return email;
    }

    public String getPseudo(){
        if(email != null && !email.isEmpty()){
            String[] parts = email.split("@");
            if(parts.length > 0 && parts[0] != null)
                return parts[0];
            else
                return "";
        }else
            return "";
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPoints() {
        return points;
    }

    public void setPoints(String points) {
        this.points = points;
    }
}
